@echo off
set LAN_CODE=%1
set SIEB_DIR=D:\Siebel\Tools\BIN
set SRF_DIR=E:\Project\SRF\AUTO
set LOG_FILE=E:\Project\SRF\AUTO\autocomplie_%LAN_CODE%.log
set CURRENT_DATE=%date:~0,4%%date:~5,2%%date:~8,2% 

echo #------------------- %date% %time% -------------------# >> %LOG_FILE%

echo Backup %LAN_CODE% SRF ... 	>> %LOG_FILE%

rename %SRF_DIR%\%LAN_CODE%\siebel_sia.srf siebel_sia.srf_%CURRENT_DATE%	 >> %LOG_FILE% 2>&1

echo Backup %LAN_CODE% SRF Finished ... 	>> %LOG_FILE%

echo Start %LAN_CODE% SRF Complie  ...	>> %LOG_FILE%  

%SIEB_DIR%\siebdev.exe /c %SIEB_DIR%\enu\tools.cfg /d DEVP /u DEV6 /p lu /tl %LAN_CODE% /bc "Siebel Repository" %SRF_DIR%\%LAN_CODE%\siebel_sia.srf >> %LOG_FILE% 2>&1

echo %LAN_CODE% SRF Completed. 	>> %LOG_FILE%

echo #------------------- %date% %time% -------------------# >> %LOG_FILE%

echo # >>%LOG_FILE%
